<?php

 

  // adds a new user to the table	
  function displayTopics() {


    $host="mysql2.000webhost.com"; 
	$db_name="a7709402_test";
	$tbl_name="postsPage";
	mysql_connect("$host", "a7709402_test", "ics414")or die("cannot connect");
	mysql_select_db("$db_name")or die("cannot select DB");
	

        $sql="SELECT * FROM postsPage";

	$result=mysql_query($sql);
        
        echo "<table border='0'>
        <tr>
        <th>Title</th>
        <th></th>
        </tr>";

        while($row = mysql_fetch_array($result)) {
          echo "<tr>";
          echo "<td>" . $row['title'] . "</td>";
          echo "<td>" . $row['username'] . "</td>";                   
          echo "<td>" . $row['datemodified'] . "</td>";   
          echo "</tr>";
        }
          echo "</table>";

}


?>